package com.kczd.entity;

import org.json.JSONException;
import org.json.JSONObject;

import java.io.Serializable;

/**
 * zhangy
 * Created by Administrator on 2017/3/3.
 */

public class Driver implements Serializable {

    private static final long serialVersionUID = 1;

    private String did;
    private String loginname;
    private String username;
    private String password;
    private String driver_img;
    private String sex;
    private String birthday;
    private String tel;
    private String car_no;
    private String car_type;
    private String car_desc;
    private int start_driver_year;
    private String tran_type;
    private String lat;
    private String lng;
    private String ukey;
    private String reg_time;
    private String can_use;
    private String company;
    private String self_sign;
    private String qualification_no;
    private String driver_license_no;

    public void Json2Object1(JSONObject json) throws JSONException {
        this.setUkey(json.getString("ukey"));
        this.setLoginname(json.getString("loginname"));
        this.setDriver_img(json.getString("head_img"));
        this.setTel(json.getString("phone"));
        this.setUsername(json.getString("username"));
        this.setSex(json.getString("sex"));
        this.setBirthday(json.getString("birthday"));
        this.setCompany(json.getString("company"));
        this.setSelf_sign(json.getString("self_sign"));
        this.setCan_use(json.getString("can_use"));
    }
    public void Json2Object(JSONObject json) throws JSONException{
        this.setUkey(json.getString("ukey"));
        this.setLoginname(json.getString("loginname"));
        this.setDriver_img(json.getString("head_img"));
        this.setTel(json.getString("phone"));
        this.setUsername(json.getString("username"));
        this.setSex(json.getString("sex"));
        this.setBirthday(json.getString("birthday"));
        this.setStart_driver_year(json.getInt("start_driver_year"));
        this.setCompany(json.getString("company"));
        this.setQualification_no(json.getString("qualification_no"));
        this.setDriver_license_no(json.getString("driver_license_no"));
        this.setSelf_sign(json.getString("self_sign"));
        this.setCan_use(json.getString("can_use"));
        this.setCar_no(json.getString("car_no"));
        this.setCar_type(json.getString("car_type"));
    }

    public Driver(){
    }
    public Driver(String did, String loginname, String username,
                  String password, String ukey, String can_use, int start_driver_year) {
        super();
        this.did = did;
        this.loginname = loginname;
        this.username = username;
        this.password = password;
        this.ukey = ukey;
        this.can_use = can_use;
        this.start_driver_year = start_driver_year;
    }

    public String getBirthday() {
        return birthday;
    }
    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }
    public String getQualification_no() {
        return qualification_no;
    }
    public void setQualification_no(String qualification_no) {
        this.qualification_no = qualification_no;
    }
    public String getDriver_license_no() {
        return driver_license_no;
    }
    public void setDriver_license_no(String driver_license_no) {
        this.driver_license_no = driver_license_no;
    }
    public String getDid() {
        return did;
    }
    public void setDid(String did) {
        this.did = did;
    }
    public String getLoginname() {
        return loginname;
    }
    public void setLoginname(String loginname) {
        this.loginname = loginname;
    }
    public String getUsername() {
        return username;
    }
    public void setUsername(String username) {
        this.username = username;
    }
    public String getPassword() {
        return password;
    }
    public void setPassword(String password) {
        this.password = password;
    }
    public String getDriver_img() {
        return driver_img;
    }
    public void setDriver_img(String driver_img) {
        this.driver_img = driver_img;
    }
    public String getSex() {
        return sex;
    }
    public void setSex(String sex) {
        this.sex = sex;
    }
    public String getTel() {
        return tel;
    }
    public void setTel(String tel) {
        this.tel = tel;
    }
    public String getCar_no() {
        return car_no;
    }
    public void setCar_no(String car_no) {
        this.car_no = car_no;
    }
    public String getCar_desc() {
        return car_desc;
    }
    public void setCar_desc(String car_desc) {
        this.car_desc = car_desc;
    }
    public String getTran_type() {
        return tran_type;
    }
    public void setTran_type(String tran_type) {
        this.tran_type = tran_type;
    }
    public String getCar_type() {
        return car_type;
    }
    public void setCar_type(String car_type) {
        this.car_type = car_type;
    }
    public int getStart_driver_year() {
        return start_driver_year;
    }
    public void setStart_driver_year(int start_driver_year) {
        this.start_driver_year = start_driver_year;
    }
    public String getCompany() {
        return company;
    }
    public void setCompany(String company) {
        this.company = company;
    }
    public String getSelf_sign() {
        return self_sign;
    }
    public void setSelf_sign(String self_sign) {
        this.self_sign = self_sign;
    }
    public String getLat() {
        return lat;
    }
    public void setLat(String lat) {
        this.lat = lat;
    }
    public String getLng() {
        return lng;
    }
    public void setLng(String lng) {
        this.lng = lng;
    }
    public String getUkey() {
        return ukey;
    }
    public void setUkey(String ukey) {
        this.ukey = ukey;
    }
    public String getReg_time() {
        return reg_time;
    }
    public void setReg_time(String reg_time) {
        this.reg_time = reg_time;
    }
    public String getCan_use() {
        return can_use;
    }
    public void setCan_use(String can_use) {
        this.can_use = can_use;
    }

}
